package cn.sumpu.app.guoguojie.constant;

import java.util.HashMap;
import java.util.Map;

public enum Sex {
	MALE("M", "男"), FEMALE("F", "女");

	private String value;
	private String label;

	private Sex(String value, String label) {
		this.value = value;
		this.label = label;
	}
	private static Map<String,String> cache;
	
	static {
		cache = new HashMap<String,String>();
		cache.put(MALE.getValue(), MALE.getLabel());
		cache.put(FEMALE.getValue(), FEMALE.getLabel());
	}
	
	public String getValue() {
		return value;
	}

	public String getLabel() {
		return label;
	}
	
	public static String getLabelByValue(String value) {
		return cache.get(value);
	}
	
}
